package handlerChain;

public class BHandler implements BaseFilterHandler{

    @Override
    public boolean isHandler(String status) {
        return "submit".equals(status);
    }

    @Override
    public boolean handle(SerialOrder object) {
        if(object.getStatus().equals("submit")){
            System.out.println("流水单当初处于 submit 状态");
            System.out.println("submit 状态处理中.....");
            System.out.println("流水单 submit 状态处理结束,将切换为 success状态");
            object.setStatus("success");
            return true;
        }else{
            object.setStatus("success");
        }
        return false;
    }
}
